package org.jianfa.learn.dubbo.filter;

import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

public class TpMonitorReporter implements Runnable{

    //每隔5s打印一次最近1分钟内每个方法的TP90、TP99的耗时情况
    public TpMonitorReporter() {
        Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(this, 0, 5, TimeUnit.SECONDS);
    }

    @Override
    public void run() {
        DataCollection.reportResponseTime();
    }
}
